package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMonitoringIndicatorsMapper;
import com.ruoyi.system.domain.DispatchMonitoringIndicators;
import com.ruoyi.system.service.IDispatchMonitoringIndicatorsService;

/**
 * 监测指标Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMonitoringIndicatorsServiceImpl implements IDispatchMonitoringIndicatorsService 
{
    @Autowired
    private DispatchMonitoringIndicatorsMapper dispatchMonitoringIndicatorsMapper;

    /**
     * 查询监测指标
     * 
     * @param monitoringIndicatorsId 监测指标主键
     * @return 监测指标
     */
    @Override
    public DispatchMonitoringIndicators selectDispatchMonitoringIndicatorsByMonitoringIndicatorsId(Long monitoringIndicatorsId)
    {
        return dispatchMonitoringIndicatorsMapper.selectDispatchMonitoringIndicatorsByMonitoringIndicatorsId(monitoringIndicatorsId);
    }

    /**
     * 查询监测指标列表
     * 
     * @param dispatchMonitoringIndicators 监测指标
     * @return 监测指标
     */
    @Override
    public List<DispatchMonitoringIndicators> selectDispatchMonitoringIndicatorsList(DispatchMonitoringIndicators dispatchMonitoringIndicators)
    {
        return dispatchMonitoringIndicatorsMapper.selectDispatchMonitoringIndicatorsList(dispatchMonitoringIndicators);
    }

    /**
     * 新增监测指标
     * 
     * @param dispatchMonitoringIndicators 监测指标
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMonitoringIndicators(DispatchMonitoringIndicators dispatchMonitoringIndicators)
    {
        return dispatchMonitoringIndicatorsMapper.insertDispatchMonitoringIndicators(dispatchMonitoringIndicators);
    }

    /**
     * 修改监测指标
     * 
     * @param dispatchMonitoringIndicators 监测指标
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMonitoringIndicators(DispatchMonitoringIndicators dispatchMonitoringIndicators)
    {
        return dispatchMonitoringIndicatorsMapper.updateDispatchMonitoringIndicators(dispatchMonitoringIndicators);
    }

    /**
     * 批量删除监测指标
     * 
     * @param monitoringIndicatorsIds 需要删除的监测指标主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringIndicatorsByMonitoringIndicatorsIds(Long[] monitoringIndicatorsIds)
    {
        return dispatchMonitoringIndicatorsMapper.deleteDispatchMonitoringIndicatorsByMonitoringIndicatorsIds(monitoringIndicatorsIds);
    }

    /**
     * 删除监测指标信息
     * 
     * @param monitoringIndicatorsId 监测指标主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringIndicatorsByMonitoringIndicatorsId(Long monitoringIndicatorsId)
    {
        return dispatchMonitoringIndicatorsMapper.deleteDispatchMonitoringIndicatorsByMonitoringIndicatorsId(monitoringIndicatorsId);
    }
}
